Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

442
Views
¿Servicio PHP-S? La imagen "php -S localhost index.php" no se muestra en el servidor en localhost

todos tengo php simple algún código:

 project |- index.php |- banana.jpg

file: index.php

 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <img src="banana.jpg" alt=""> </body> </html>

Entonces, abro el símbolo del sistema en la carpeta del project y ejecuto $ php -S localhost:8000 index.php y luego abro el navegador

pero no mostrar mi imagen :(

ingrese la descripción de la imagen aquí

Por favor, ayuda y cuéntame sobre la forma de solución ...

Muchas gracias

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debe ser un bug en el servidor web php, hice pruebas con la versión 8.0.9 y me pasa lo mismo, no reconoce el tipo.

ingrese la descripción de la imagen aquí

Con php -S localhost: 8000 funciona correctamente, por defecto php ejecuta el archivo index.php

 php -S localhost: 8000

Si el archivo está en "public/index.php", podría ejecutar:

 php -S localhost: 8000 -t public

Puede encontrar más información en: https://www.php.net/manual/en/features.commandline.webserver.php

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!